package com.css.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 乐企能力授权状态
 */
@Getter
@AllArgsConstructor
public enum LqNlsqztEnum {
    YSQ("1","已授权"),

    WSQ("2","未授权"),

    DQR("3","待确认（直连单位向使用单位发起能力授权邀请）"),

    DQRYQ("4","待确认邀请（使用单位向直连单位发起能力授权申请）");

    private final String dm;

    private final String mc;

    public static String getMc(String dm) {
        LqNlsqztEnum res = Arrays.stream(values())
                .filter(x -> x.getDm().equals(dm))
                .findFirst().orElse(null);
        return res == null ? null : res.getMc();
    }
}
